const path = require('path');
const w = require('webpack');
module.exports = {
    entry: {
        idx: './src/idx.js'
    },
    output: {
	filename: '[name].[chunkHash].js',
	path: path.resolve(__dirname, './dist/'),
        publicPath: './dist/'
    },
    module: {
        rules: [
	    {
		test: path.resolve(__dirname, 'src/idx.js'), // 必须明确指定针对哪个模块
		use: [{
		    loader: 'imports-loader',
		    options: {
			// 这里和webpack.provide..是一样的 有resolve 去指定的配置没有去node_modules
			$: 'jquery'
		    }
		}]
	    }
	]
    }
}
